home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctjoc85.arc
/
PCNTPGS
< prev
next >
Wrap
Text File
|
1985-07-24
|
1KB
|
42 lines
% File: pcntpgs
% Auth: Richard Foard
%
% Zim procedure to discover the number of pages booked for an
% issue; gives total numbers of editorial and listing pages.
%
Procedure pcntpgs(in vol, in num)
% validate input, fetch indicated issue
let vvolume = $tonumber(vol, 0)
let vnumber = $tonumber(num, 0)
find Issues where Volume = vvolume and Number = vnumber
% if valid issue, get articles, list titles, and count pages
If $SetCount > 0
let vtotedit = 0 % total editorial pages
let vtotlist = 0 % total listing pages
find all Articles where Volume = vvolume \
and Number = vnumber
while $SetCount > 0
let vtitle = Title
output vtitle
let vtotedit = vtotedit + EditPages
let vtotlist = vtotlist + ListPages
next
let $SetCount = $SetCount - 1
endwhile
output
output 'Total pages:'
output vtotedit ' Editorial Pages'
output vtotlist ' Listing Pages'
output (vtotedit + vtotlist) ' Total Pages'
else
output 'Issue' vvolume '/' vnumber 'does not exist'
endif
Endprocedure